FROM eclipse-temurin:17-jre-alpine

# 设置时区
RUN apk add --no-cache tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone

# 设置工作目录
WORKDIR /app

# 拷贝项目文件
COPY target/Java-HanSoul-0.0.1-SNAPSHOT.jar /app/Java-HanSoul-0.0.1-SNAPSHOT.jar

#CMD java -jar Java-HanSoul-0.0.1-SNAPSHOT.jar

# 暴露端口
EXPOSE 8000

ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=docker", "/app/Java-HanSoul-0.0.1-SNAPSHOT.jar"]




